home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1991-04-03 | 8.6 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: tcphi.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Wed Apr 3 18:30:26 1991, modified Wed Apr 3 18:30:26 1991, creator 'MPS ', type ASCII, 7790 bytes "tcphi.c" , at 0x1eee 830 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 74 63 70 68 69 2e | 63 00 00 00 00 00 00 00 |..tcphi.|c.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 1e 6e 00 | 00 03 3e a4 20 16 12 a4 |......n.|..>. ...|
|00000060| 20 16 12 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 0d 10 00 00 |........|........|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 23 0d 23 |--------|----.#.#|
|000000c0| 09 4e 65 77 73 57 61 74 | 63 68 65 72 09 2d 20 4d |.NewsWat|cher.- M|
|000000d0| 61 63 69 6e 74 6f 73 68 | 20 4e 4e 54 50 20 43 6c |acintosh| NNTP Cl|
|000000e0| 69 65 6e 74 20 41 70 70 | 6c 69 63 61 74 69 6f 6e |ient App|lication|
|000000f0| 0d 23 0d 23 09 57 72 69 | 74 74 65 6e 20 62 79 20 |.#.#.Wri|tten by |
|00000100| 53 74 65 76 65 6e 20 46 | 61 6c 6b 65 6e 62 75 72 |Steven F|alkenbur|
|00000110| 67 0d 23 09 a9 31 39 39 | 30 20 41 70 70 6c 65 20 |g.#..199|0 Apple |
|00000120| 43 6f 6d 70 75 74 65 72 | 2c 20 49 6e 63 2e 0d 23 |Computer|, Inc..#|
|00000130| 0d 23 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.#------|--------|
|00000140| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0d 23 0d |--------|-----.#.|
|00000170| 23 09 54 43 50 48 69 2e | 63 0d 23 0d 23 09 54 68 |#.TCPHi.|c.#.#.Th|
|00000180| 69 73 20 6d 6f 64 75 6c | 65 20 63 6f 6e 74 61 69 |is modul|e contai|
|00000190| 6e 73 20 68 69 67 68 2d | 6c 65 76 65 6c 20 72 6f |ns high-|level ro|
|000001a0| 75 74 69 6e 65 73 20 66 | 6f 72 20 73 65 74 74 69 |utines f|or setti|
|000001b0| 6e 67 0d 23 09 75 70 20 | 63 6f 6e 6e 65 63 74 69 |ng.#.up |connecti|
|000001c0| 6f 6e 73 20 75 73 69 6e | 67 20 4d 61 63 54 43 50 |ons usin|g MacTCP|
|000001d0| 20 61 6e 64 20 73 65 6e | 64 69 6e 67 2f 72 65 63 | and sen|ding/rec|
|000001e0| 65 69 76 69 6e 67 20 64 | 61 74 61 0d 23 09 6f 6e |eiving d|ata.#.on|
|000001f0| 20 74 68 65 73 65 20 63 | 6f 6e 6e 65 63 74 69 6f | these c|onnectio|
|00000200| 6e 73 2e 0d 23 0d 23 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ns..#.#-|--------|
|00000210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000240| 2d 2d 2a 2f 0d 0d 23 70 | 72 61 67 6d 61 20 73 65 |--*/..#p|ragma se|
|00000250| 67 6d 65 6e 74 20 6c 6f | 77 6c 65 76 65 6c 0d 0d |gment lo|wlevel..|
|00000260| 23 69 6e 63 6c 75 64 65 | 20 22 63 6f 6d 70 61 74 |#include| "compat|
|00000270| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |.h".#inc|lude <st|
|00000280| 72 69 6e 67 2e 68 3e 0d | 0d 23 69 66 64 65 66 20 |ring.h>.|.#ifdef |
|00000290| 50 52 4f 54 4f 53 0d 23 | 69 6e 63 6c 75 64 65 20 |PROTOS.#|include |
|000002a0| 3c 54 79 70 65 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<Types.h|>.#inclu|
|000002b0| 64 65 20 3c 4d 65 6d 6f | 72 79 2e 68 3e 0d 23 69 |de <Memo|ry.h>.#i|
|000002c0| 6e 63 6c 75 64 65 20 3c | 44 69 61 6c 6f 67 73 2e |nclude <|Dialogs.|
|000002d0| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 52 65 73 |h>.#incl|ude <Res|
|000002e0| 6f 75 72 63 65 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |ources.h|>.#inclu|
|000002f0| 64 65 20 3c 43 75 72 73 | 6f 72 43 74 6c 2e 68 3e |de <Curs|orCtl.h>|
|00000300| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 53 74 72 69 6e |.#includ|e <Strin|
|00000310| 67 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |gs.h>.#i|nclude <|
|00000320| 4c 69 73 74 73 2e 68 3e | 0d 23 65 6e 64 69 66 0d |Lists.h>|.#endif.|
|00000330| 0d 23 69 6e 63 6c 75 64 | 65 20 22 4d 61 63 54 43 |.#includ|e "MacTC|
|00000340| 50 43 6f 6d 6d 6f 6e 54 | 79 70 65 73 2e 68 22 0d |PCommonT|ypes.h".|
|00000350| 23 69 6e 63 6c 75 64 65 | 20 22 47 65 74 4d 79 49 |#include| "GetMyI|
|00000360| 50 41 64 64 72 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |PAddr.h"|.#includ|
|00000370| 65 20 22 54 43 50 50 42 | 2e 68 22 0d 23 69 6e 63 |e "TCPPB|.h".#inc|
|00000380| 6c 75 64 65 20 22 54 43 | 50 52 6f 75 74 69 6e 65 |lude "TC|PRoutine|
|00000390| 73 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 54 |s.h".#in|clude "T|
|000003a0| 43 50 48 69 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |CPHi.h".|#include|
|000003b0| 20 22 6e 6e 74 70 2e 68 | 22 0d 23 69 6e 63 6c 75 | "nntp.h|".#inclu|
|000003c0| 64 65 20 22 6d 69 73 63 | 73 74 75 66 66 2e 68 22 |de "misc|stuff.h"|
|000003d0| 0d 0d 23 69 66 6e 64 65 | 66 20 54 48 49 4e 4b 5f |..#ifnde|f THINK_|
|000003e0| 43 0d 61 63 75 72 48 61 | 6e 64 6c 65 20 67 4e 65 |C.acurHa|ndle gNe|
|000003f0| 74 41 63 75 72 3b 09 09 | 2f 2a 20 6e 65 74 77 6f |tAcur;..|/* netwo|
|00000400| 72 6b 20 61 6e 69 6d 61 | 74 65 64 20 63 75 72 73 |rk anima|ted curs|
|00000410| 6f 72 20 68 61 6e 64 6c | 65 20 2a 2f 0d 23 65 6c |or handl|e */.#el|
|00000420| 73 65 0d 48 61 6e 64 6c | 65 20 67 4e 65 74 41 63 |se.Handl|e gNetAc|
|00000430| 75 72 3b 0d 23 65 6e 64 | 69 66 0d 0d 0d 0d 2f 2a |ur;.#end|if..../*|
|00000440| 09 49 6e 69 74 4e 65 74 | 43 75 72 73 6f 72 20 6c |.InitNet|Cursor l|
|00000450| 6f 61 64 73 20 74 68 65 | 20 6e 65 74 77 6f 72 6b |oads the| network|
|00000460| 20 61 6e 69 6d 61 74 65 | 64 20 63 75 72 73 6f 72 | animate|d cursor|
|00000470| 2c 20 64 65 70 69 63 74 | 69 6e 67 20 6e 65 74 77 |, depict|ing netw|
|00000480| 6f 72 6b 20 74 72 61 66 | 66 69 63 0d 2a 2f 0d 0d |ork traf|fic.*/..|
|00000490| 76 6f 69 64 20 49 6e 69 | 74 4e 65 74 43 75 72 73 |void Ini|tNetCurs|
|000004a0| 6f 72 28 76 6f 69 64 29 | 0d 7b 0d 23 69 66 6e 64 |or(void)|.{.#ifnd|
|000004b0| 65 66 20 54 48 49 4e 4b | 5f 43 0d 09 67 4e 65 74 |ef THINK|_C..gNet|
|000004c0| 41 63 75 72 20 3d 20 28 | 61 63 75 72 48 61 6e 64 |Acur = (|acurHand|
|000004d0| 6c 65 29 20 47 65 74 52 | 65 73 6f 75 72 63 65 28 |le) GetR|esource(|
|000004e0| 27 61 63 75 72 27 2c 31 | 32 38 29 3b 0d 09 49 6e |'acur',1|28);..In|
|000004f0| 69 74 43 75 72 73 6f 72 | 43 74 6c 28 67 4e 65 74 |itCursor|Ctl(gNet|
|00000500| 41 63 75 72 29 3b 0d 23 | 65 6e 64 69 66 0d 7d 0d |Acur);.#|endif.}.|
|00000510| 0d 0d 2f 2a 09 54 72 61 | 73 68 4e 65 74 43 75 72 |../*.Tra|shNetCur|
|00000520| 73 6f 72 20 64 69 73 70 | 6f 73 65 73 20 74 68 65 |sor disp|oses the|
|00000530| 20 6e 65 74 77 6f 72 6b | 20 63 75 72 73 6f 72 20 | network| cursor |
|00000540| 61 6c 6c 6f 77 69 6e 67 | 20 74 68 65 20 73 70 69 |allowing| the spi|
|00000550| 6e 6e 69 6e 67 20 62 65 | 61 63 68 0d 09 62 61 6c |nning be|ach..bal|
|00000560| 6c 20 74 6f 20 62 65 20 | 75 73 65 64 2e 0d 2a 2f |l to be |used..*/|
|00000570| 0d 0d 76 6f 69 64 20 54 | 72 61 73 68 4e 65 74 43 |..void T|rashNetC|
|00000580| 75 72 73 6f 72 28 76 6f | 69 64 29 0d 7b 0d 23 69 |ursor(vo|id).{.#i|
|00000590| 66 6e 64 65 66 20 54 48 | 49 4e 4b 5f 43 0d 09 49 |fndef TH|INK_C..I|
|000005a0| 6e 69 74 43 75 72 73 6f | 72 43 74 6c 28 6e 69 6c |nitCurso|rCtl(nil|
|000005b0| 29 3b 0d 09 52 65 6c 65 | 61 73 65 52 65 73 6f 75 |);..Rele|aseResou|
|000005c0| 72 63 65 28 28 48 61 6e | 64 6c 65 29 67 4e 65 74 |rce((Han|dle)gNet|
|000005d0| 41 63 75 72 29 3b 0d 23 | 65 6e 64 69 66 0d 7d 0d |Acur);.#|endif.}.|
|000005e0| 0d 0d 2f 2a 20 49 6e 69 | 74 4e 65 74 77 6f 72 6b |../* Ini|tNetwork|
|000005f0| 20 6f 70 65 6e 73 20 74 | 68 65 20 6e 65 74 77 6f | opens t|he netwo|
|00000600| 72 6b 20 64 72 69 76 65 | 72 0d 2a 2f 0d 0d 4f 53 |rk drive|r.*/..OS|
|00000610| 45 72 72 20 49 6e 69 74 | 4e 65 74 77 6f 72 6b 28 |Err Init|Network(|
|00000620| 76 6f 69 64 29 0d 7b 0d | 09 72 65 74 75 72 6e 20 |void).{.|.return |
|00000630| 4f 70 65 6e 54 43 50 44 | 72 69 76 65 72 28 29 3b |OpenTCPD|river();|
|00000640| 0d 7d 0d 0d 0d 2f 2a 20 | 43 72 65 61 74 65 53 74 |.}.../* |CreateSt|
|00000650| 72 65 61 6d 28 29 20 63 | 72 65 61 74 65 73 20 61 |ream() c|reates a|
|00000660| 6e 20 75 6e 63 6f 6e 6e | 65 63 74 65 64 20 6e 65 |n unconn|ected ne|
|00000670| 74 77 6f 72 6b 20 73 74 | 72 65 61 6d 20 74 6f 20 |twork st|ream to |
|00000680| 62 65 0d 20 20 20 75 73 | 65 64 20 6c 61 74 65 72 |be. us|ed later|
|00000690| 20 62 79 20 4f 70 65 6e | 43 6f 6e 6e 65 63 74 69 | by Open|Connecti|
|000006a0| 6f 6e 2e 20 20 54 68 65 | 20 6c 65 6e 67 74 68 20 |on. The| length |
|000006b0| 6f 66 20 74 68 65 20 72 | 65 63 65 69 76 65 0d 20 |of the r|eceive. |
|000006c0| 20 20 62 75 66 66 65 72 | 20 6d 75 73 74 20 62 65 | buffer| must be|
|000006d0| 20 73 70 65 63 69 66 69 | 65 64 20 69 6e 20 74 68 | specifi|ed in th|
|000006e0| 65 20 63 61 6c 6c 20 2a | 2f 0d 20 20 20 0d 4f 53 |e call *|/. .OS|
|000006f0| 45 72 72 20 43 72 65 61 | 74 65 53 74 72 65 61 6d |Err Crea|teStream|
|00000700| 28 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 20 2a |(unsigne|d long *|
|00000710| 73 74 72 65 61 6d 2c 75 | 6e 73 69 67 6e 65 64 20 |stream,u|nsigned |
|00000720| 6c 6f 6e 67 20 72 65 63 | 76 4c 65 6e 29 0d 7b 0d |long rec|vLen).{.|
|00000730| 09 50 74 72 20 72 65 63 | 76 50 74 72 3b 0d 09 4f |.Ptr rec|vPtr;..O|
|00000740| 53 45 72 72 20 65 72 72 | 3b 0d 09 0d 09 72 65 63 |SErr err|;....rec|
|00000750| 76 50 74 72 20 3d 20 4d | 79 4e 65 77 50 74 72 28 |vPtr = M|yNewPtr(|
|00000760| 72 65 63 76 4c 65 6e 29 | 3b 0d 09 69 66 20 28 28 |recvLen)|;..if ((|
|00000770| 65 72 72 20 3d 20 4d 79 | 4d 65 6d 45 72 72 28 29 |err = My|MemErr()|
|00000780| 29 3d 3d 6e 6f 45 72 72 | 29 0d 09 09 65 72 72 20 |)==noErr|)...err |
|00000790| 3d 20 4c 6f 77 54 43 50 | 43 72 65 61 74 65 53 74 |= LowTCP|CreateSt|
|000007a0| 72 65 61 6d 28 73 74 72 | 65 61 6d 2c 72 65 63 76 |ream(str|eam,recv|
|000007b0| 50 74 72 2c 72 65 63 76 | 4c 65 6e 2c 28 54 43 50 |Ptr,recv|Len,(TCP|
|000007c0| 4e 6f 74 69 66 79 50 72 | 6f 63 29 6e 69 6c 29 3b |NotifyPr|oc)nil);|
|000007d0| 0d 09 72 65 74 75 72 6e | 20 65 72 72 3b 0d 7d 0d |..return| err;.}.|
|000007e0| 0d 0d 2f 2a 20 4f 70 65 | 6e 43 6f 6e 6e 65 63 74 |../* Ope|nConnect|
|000007f0| 69 6f 6e 28 29 20 69 6e | 69 74 69 61 74 65 73 20 |ion() in|itiates |
|00000800| 61 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 74 6f 20 |a connec|tion to |
|00000810| 61 20 72 65 6d 6f 74 65 | 20 6d 61 63 68 69 6e 65 |a remote| machine|
|00000820| 2c 0d 20 20 20 67 69 76 | 65 6e 20 74 68 61 74 20 |,. giv|en that |
|00000830| 6d 61 63 68 69 6e 65 27 | 73 20 6e 65 74 77 6f 72 |machine'|s networ|
|00000840| 6b 20 6e 75 6d 62 65 72 | 20 61 6e 64 20 63 6f 6e |k number| and con|
|00000850| 6e 65 63 74 69 6f 6e 20 | 70 6f 72 74 2e 20 20 41 |nection |port. A|
|00000860| 20 74 69 6d 65 6f 75 74 | 0d 20 20 20 76 61 6c 75 | timeout|. valu|
|00000870| 65 20 66 6f 72 20 74 68 | 65 20 63 61 6c 6c 20 6d |e for th|e call m|
|00000880| 75 73 74 20 62 65 20 67 | 69 76 65 6e 2c 20 61 6e |ust be g|iven, an|
|00000890| 64 20 74 68 65 20 73 74 | 72 65 61 6d 20 69 64 65 |d the st|ream ide|
|000008a0| 6e 74 69 66 69 65 72 20 | 69 73 20 72 65 74 75 72 |ntifier |is retur|
|000008b0| 6e 65 64 2e 20 2a 2f 0d | 0d 4f 53 45 72 72 20 4f |ned. */.|.OSErr O|
|000008c0| 70 65 6e 43 6f 6e 6e 65 | 63 74 69 6f 6e 28 75 6e |penConne|ction(un|
|000008d0| 73 69 67 6e 65 64 20 6c | 6f 6e 67 20 73 74 72 65 |signed l|ong stre|
|000008e0| 61 6d 2c 6c 6f 6e 67 20 | 72 65 6d 6f 74 65 48 6f |am,long |remoteHo|
|000008f0| 73 74 2c 73 68 6f 72 74 | 20 72 65 6d 6f 74 65 50 |st,short| remoteP|
|00000900| 6f 72 74 2c 42 79 74 65 | 20 74 69 6d 65 6f 75 74 |ort,Byte| timeout|
|00000910| 29 0d 7b 0d 09 69 70 5f | 61 64 64 72 20 6c 6f 63 |).{..ip_|addr loc|
|00000920| 61 6c 48 6f 73 74 3b 0d | 09 74 63 70 5f 70 6f 72 |alHost;.|.tcp_por|
|00000930| 74 20 6c 6f 63 61 6c 50 | 6f 72 74 20 3d 20 30 3b |t localP|ort = 0;|
|00000940| 0d 09 0d 09 72 65 74 75 | 72 6e 20 4c 6f 77 54 43 |....retu|rn LowTC|
|00000950| 50 4f 70 65 6e 43 6f 6e | 6e 65 63 74 69 6f 6e 28 |POpenCon|nection(|
|00000960| 73 74 72 65 61 6d 2c 74 | 69 6d 65 6f 75 74 2c 72 |stream,t|imeout,r|
|00000970| 65 6d 6f 74 65 48 6f 73 | 74 2c 72 65 6d 6f 74 65 |emoteHos|t,remote|
|00000980| 50 6f 72 74 2c 26 6c 6f | 63 61 6c 48 6f 73 74 2c |Port,&lo|calHost,|
|00000990| 0d 09 09 09 09 09 09 09 | 09 26 6c 6f 63 61 6c 50 |........|.&localP|
|000009a0| 6f 72 74 29 3b 0d 7d 0d | 0d 0d 2f 2a 20 57 61 69 |ort);.}.|../* Wai|
|000009b0| 74 46 6f 72 43 6f 6e 6e | 65 63 74 69 6f 6e 28 29 |tForConn|ection()|
|000009c0| 20 6c 69 73 74 65 6e 73 | 20 66 6f 72 20 61 20 63 | listens| for a c|
|000009d0| 6f 6e 6e 65 63 74 69 6f | 6e 20 6f 6e 20 61 20 70 |onnectio|n on a p|
|000009e0| 61 72 74 69 63 75 6c 61 | 72 20 70 6f 72 74 20 66 |articula|r port f|
|000009f0| 72 6f 6d 20 61 0d 09 70 | 61 72 74 69 63 75 6c 61 |rom a..p|articula|
|00000a00| 72 20 68 6f 73 74 2e 20 | 20 49 74 20 72 65 74 75 |r host. | It retu|
|00000a10| 72 6e 73 20 77 68 65 6e | 20 61 20 63 6f 6e 6e 65 |rns when| a conne|
|00000a20| 63 74 69 6f 6e 20 68 61 | 73 20 62 65 65 6e 20 65 |ction ha|s been e|
|00000a30| 73 74 61 62 6c 69 73 68 | 65 64 20 2a 2f 0d 0d 4f |stablish|ed */..O|
|00000a40| 53 45 72 72 20 57 61 69 | 74 46 6f 72 43 6f 6e 6e |SErr Wai|tForConn|
|00000a50| 65 63 74 69 6f 6e 28 75 | 6e 73 69 67 6e 65 64 20 |ection(u|nsigned |
|00000a60| 6c 6f 6e 67 20 73 74 72 | 65 61 6d 2c 42 79 74 65 |long str|eam,Byte|
|00000a70| 20 74 69 6d 65 6f 75 74 | 2c 73 68 6f 72 74 20 6c | timeout|,short l|
|00000a80| 6f 63 61 6c 50 6f 72 74 | 2c 0d 09 09 09 09 09 09 |ocalPort|,.......|
|00000a90| 6c 6f 6e 67 20 2a 72 65 | 6d 6f 74 65 48 6f 73 74 |long *re|moteHost|
|00000aa0| 2c 73 68 6f 72 74 20 2a | 72 65 6d 6f 74 65 50 6f |,short *|remotePo|
|00000ab0| 72 74 29 0d 7b 0d 09 69 | 70 5f 61 64 64 72 20 6c |rt).{..i|p_addr l|
|00000ac0| 6f 63 61 6c 48 6f 73 74 | 3b 0d 09 0d 09 72 65 74 |ocalHost|;....ret|
|00000ad0| 75 72 6e 20 4c 6f 77 54 | 43 50 57 61 69 74 46 6f |urn LowT|CPWaitFo|
|00000ae0| 72 43 6f 6e 6e 65 63 74 | 69 6f 6e 28 73 74 72 65 |rConnect|ion(stre|
|00000af0| 61 6d 2c 74 69 6d 65 6f | 75 74 2c 28 69 70 5f 61 |am,timeo|ut,(ip_a|
|00000b00| 64 64 72 20 2a 29 72 65 | 6d 6f 74 65 48 6f 73 74 |ddr *)re|moteHost|
|00000b10| 2c 0d 09 09 09 09 28 74 | 63 70 5f 70 6f 72 74 20 |,.....(t|cp_port |
|00000b20| 2a 29 72 65 6d 6f 74 65 | 50 6f 72 74 2c 26 6c 6f |*)remote|Port,&lo|
|00000b30| 63 61 6c 48 6f 73 74 2c | 28 74 63 70 5f 70 6f 72 |calHost,|(tcp_por|
|00000b40| 74 20 2a 29 26 6c 6f 63 | 61 6c 50 6f 72 74 2c 66 |t *)&loc|alPort,f|
|00000b50| 61 6c 73 65 2c 6e 69 6c | 29 3b 0d 7d 0d 0d 0d 2f |alse,nil|);.}.../|
|00000b60| 2a 20 41 73 79 6e 63 57 | 61 69 74 46 6f 72 43 6f |* AsyncW|aitForCo|
|00000b70| 6e 6e 65 63 74 69 6f 6e | 28 29 20 6c 69 73 74 65 |nnection|() liste|
|00000b80| 6e 73 20 66 6f 72 20 61 | 20 63 6f 6e 6e 65 63 74 |ns for a| connect|
|00000b90| 69 6f 6e 20 6f 6e 20 61 | 20 70 61 72 74 69 63 75 |ion on a| particu|
|00000ba0| 6c 61 72 20 70 6f 72 74 | 20 66 72 6f 6d 20 61 0d |lar port| from a.|
|00000bb0| 09 70 61 72 74 69 63 75 | 6c 61 72 20 68 6f 73 74 |.particu|lar host|
|00000bc0| 2e 20 20 49 74 20 69 73 | 20 65 78 65 63 75 74 65 |. It is| execute|
|00000bd0| 64 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 6c 79 |d asynch|ronously|
|00000be0| 20 61 6e 64 20 72 65 74 | 75 72 6e 73 20 69 6d 6d | and ret|urns imm|
|00000bf0| 65 64 69 61 74 65 6c 79 | 20 2a 2f 0d 0d 76 6f 69 |ediately| */..voi|
|00000c00| 64 20 41 73 79 6e 63 57 | 61 69 74 46 6f 72 43 6f |d AsyncW|aitForCo|
|00000c10| 6e 6e 65 63 74 69 6f 6e | 28 75 6e 73 69 67 6e 65 |nnection|(unsigne|
|00000c20| 64 20 6c 6f 6e 67 20 73 | 74 72 65 61 6d 2c 42 79 |d long s|tream,By|
|00000c30| 74 65 20 74 69 6d 65 6f | 75 74 2c 73 68 6f 72 74 |te timeo|ut,short|
|00000c40| 20 6c 6f 63 61 6c 50 6f | 72 74 2c 0d 09 09 09 09 | localPo|rt,.....|
|00000c50| 6c 6f 6e 67 20 72 65 6d | 6f 74 65 48 6f 73 74 2c |long rem|oteHost,|
|00000c60| 73 68 6f 72 74 20 72 65 | 6d 6f 74 65 50 6f 72 74 |short re|motePort|
|00000c70| 2c 54 43 50 69 6f 70 62 | 20 2a 2a 72 65 74 75 72 |,TCPiopb| **retur|
|00000c80| 6e 42 6c 6f 63 6b 29 0d | 7b 0d 09 69 70 5f 61 64 |nBlock).|{..ip_ad|
|00000c90| 64 72 20 6c 6f 63 61 6c | 48 6f 73 74 3b 0d 09 0d |dr local|Host;...|
|00000ca0| 09 4c 6f 77 54 43 50 57 | 61 69 74 46 6f 72 43 6f |.LowTCPW|aitForCo|
|00000cb0| 6e 6e 65 63 74 69 6f 6e | 28 73 74 72 65 61 6d 2c |nnection|(stream,|
|00000cc0| 74 69 6d 65 6f 75 74 2c | 28 69 70 5f 61 64 64 72 |timeout,|(ip_addr|
|00000cd0| 20 2a 29 26 72 65 6d 6f | 74 65 48 6f 73 74 2c 0d | *)&remo|teHost,.|
|00000ce0| 09 09 09 09 28 74 63 70 | 5f 70 6f 72 74 20 2a 29 |....(tcp|_port *)|
|00000cf0| 26 72 65 6d 6f 74 65 50 | 6f 72 74 2c 26 6c 6f 63 |&remoteP|ort,&loc|
|00000d00| 61 6c 48 6f 73 74 2c 28 | 74 63 70 5f 70 6f 72 74 |alHost,(|tcp_port|
|00000d10| 20 2a 29 26 6c 6f 63 61 | 6c 50 6f 72 74 2c 74 72 | *)&loca|lPort,tr|
|00000d20| 75 65 2c 72 65 74 75 72 | 6e 42 6c 6f 63 6b 29 3b |ue,retur|nBlock);|
|00000d30| 0d 7d 0d 0d 0d 2f 2a 20 | 41 73 79 6e 63 47 65 74 |.}.../* |AsyncGet|
|00000d40| 43 6f 6e 6e 65 63 74 69 | 6f 6e 44 61 74 61 28 29 |Connecti|onData()|
|00000d50| 20 73 68 6f 75 6c 64 20 | 62 65 20 63 61 6c 6c 65 | should |be calle|
|00000d60| 64 20 77 68 65 6e 20 61 | 20 63 61 6c 6c 20 74 6f |d when a| call to|
|00000d70| 20 41 73 79 6e 63 57 61 | 69 74 46 6f 72 43 6f 6e | AsyncWa|itForCon|
|00000d80| 6e 65 63 74 69 6f 6e 0d | 09 63 6f 6d 70 6c 65 74 |nection.|.complet|
|00000d90| 65 73 20 28 77 68 65 6e | 20 72 65 74 75 72 6e 42 |es (when| returnB|
|00000da0| 6c 6f 63 6b 2d 3e 69 6f | 52 65 73 75 6c 74 20 3c |lock->io|Result <|
|00000db0| 3d 20 30 29 2e 20 20 54 | 68 69 73 20 63 61 6c 6c |= 0). T|his call|
|00000dc0| 20 72 65 74 72 69 65 76 | 65 73 20 74 68 65 20 69 | retriev|es the i|
|00000dd0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 0d 09 61 62 6f 75 |nformati|on..abou|
|00000de0| 74 20 74 68 69 73 20 6e | 65 77 20 63 6f 6e 6e 65 |t this n|ew conne|
|00000df0| 63 74 69 6f 6e 20 61 6e | 64 20 64 69 73 70 6f 73 |ction an|d dispos|
|00000e00| 65 73 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |es the p|arameter|
|00000e10| 20 62 6c 6f 63 6b 2e 20 | 2a 2f 0d 09 0d 4f 53 45 | block. |*/...OSE|
|00000e20| 72 72 20 41 73 79 6e 63 | 47 65 74 43 6f 6e 6e 65 |rr Async|GetConne|
|00000e30| 63 74 69 6f 6e 44 61 74 | 61 28 54 43 50 69 6f 70 |ctionDat|a(TCPiop|
|00000e40| 62 20 2a 72 65 74 75 72 | 6e 42 6c 6f 63 6b 2c 6c |b *retur|nBlock,l|
|00000e50| 6f 6e 67 20 2a 72 65 6d | 6f 74 65 48 6f 73 74 2c |ong *rem|oteHost,|
|00000e60| 73 68 6f 72 74 20 2a 72 | 65 6d 6f 74 65 50 6f 72 |short *r|emotePor|
|00000e70| 74 29 0d 7b 0d 09 69 70 | 5f 61 64 64 72 20 6c 6f |t).{..ip|_addr lo|
|00000e80| 63 61 6c 48 6f 73 74 3b | 0d 09 74 63 70 5f 70 6f |calHost;|..tcp_po|
|00000e90| 72 74 20 6c 6f 63 61 6c | 50 6f 72 74 3b 0d 09 0d |rt local|Port;...|
|00000ea0| 09 72 65 74 75 72 6e 20 | 4c 6f 77 46 69 6e 69 73 |.return |LowFinis|
|00000eb0| 68 54 43 50 57 61 69 74 | 46 6f 72 43 6f 6e 6e 28 |hTCPWait|ForConn(|
|00000ec0| 72 65 74 75 72 6e 42 6c | 6f 63 6b 2c 28 69 70 5f |returnBl|ock,(ip_|
|00000ed0| 61 64 64 72 20 2a 29 72 | 65 6d 6f 74 65 48 6f 73 |addr *)r|emoteHos|
|00000ee0| 74 2c 0d 09 09 09 09 09 | 09 28 74 63 70 5f 70 6f |t,......|.(tcp_po|
|00000ef0| 72 74 20 2a 29 72 65 6d | 6f 74 65 50 6f 72 74 2c |rt *)rem|otePort,|
|00000f00| 26 6c 6f 63 61 6c 48 6f | 73 74 2c 26 6c 6f 63 61 |&localHo|st,&loca|
|00000f10| 6c 50 6f 72 74 29 3b 0d | 7d 0d 0d 0d 2f 2a 20 43 |lPort);.|}.../* C|
|00000f20| 6c 6f 73 65 43 6f 6e 6e | 65 63 74 69 6f 6e 28 29 |loseConn|ection()|
|00000f30| 20 74 65 72 6d 69 6e 61 | 74 65 73 20 61 20 63 6f | termina|tes a co|
|00000f40| 6e 6e 65 63 74 69 6f 6e | 20 74 6f 20 61 20 72 65 |nnection| to a re|
|00000f50| 6d 6f 74 65 20 68 6f 73 | 74 2c 20 67 69 76 65 6e |mote hos|t, given|
|00000f60| 20 74 68 65 0d 20 20 20 | 73 74 72 65 61 6d 20 69 | the. |stream i|
|00000f70| 64 65 6e 74 69 66 69 65 | 72 20 6f 66 20 74 68 65 |dentifie|r of the|
|00000f80| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 2a 2f 0d 20 | connect|ion */. |
|00000f90| 20 20 0d 4f 53 45 72 72 | 20 43 6c 6f 73 65 43 6f | .OSErr| CloseCo|
|00000fa0| 6e 6e 65 63 74 69 6f 6e | 28 75 6e 73 69 67 6e 65 |nnection|(unsigne|
|00000fb0| 64 20 6c 6f 6e 67 20 73 | 74 72 65 61 6d 29 0d 7b |d long s|tream).{|
|00000fc0| 0d 09 72 65 74 75 72 6e | 20 4c 6f 77 54 43 50 43 |..return| LowTCPC|
|00000fd0| 6c 6f 73 65 28 73 74 72 | 65 61 6d 2c 31 30 29 3b |lose(str|eam,10);|
|00000fe0| 0d 7d 0d 0d 0d 2f 2a 20 | 41 62 6f 72 74 43 6f 6e |.}.../* |AbortCon|
|00000ff0| 6e 65 63 74 69 6f 6e 28 | 29 20 61 62 6f 72 74 73 |nection(|) aborts|
|00001000| 20 61 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 20 74 6f | a conne|ction to|
|00001010| 20 61 20 72 65 6d 6f 74 | 65 20 68 6f 73 74 2c 20 | a remot|e host, |
|00001020| 67 69 76 65 6e 20 74 68 | 65 0d 20 20 20 73 74 72 |given th|e. str|
|00001030| 65 61 6d 20 69 64 65 6e | 74 69 66 69 65 72 20 6f |eam iden|tifier o|
|00001040| 66 20 74 68 65 20 63 6f | 6e 6e 65 63 74 69 6f 6e |f the co|nnection|
|00001050| 20 2a 2f 0d 20 20 20 0d | 4f 53 45 72 72 20 41 62 | */. .|OSErr Ab|
|00001060| 6f 72 74 43 6f 6e 6e 65 | 63 74 69 6f 6e 28 75 6e |ortConne|ction(un|
|00001070| 73 69 67 6e 65 64 20 6c | 6f 6e 67 20 73 74 72 65 |signed l|ong stre|
|00001080| 61 6d 29 0d 7b 0d 09 72 | 65 74 75 72 6e 20 4c 6f |am).{..r|eturn Lo|
|00001090| 77 54 43 50 41 62 6f 72 | 74 28 73 74 72 65 61 6d |wTCPAbor|t(stream|
|000010a0| 29 3b 0d 7d 0d 09 0d 0d | 2f 2a 20 52 65 6c 65 61 |);.}....|/* Relea|
|000010b0| 73 65 53 74 72 65 61 6d | 28 29 20 66 72 65 65 73 |seStream|() frees|
|000010c0| 20 74 68 65 20 61 6c 6c | 6f 63 61 74 65 64 20 62 | the all|ocated b|
|000010d0| 75 66 66 65 72 20 73 70 | 61 63 65 20 66 6f 72 20 |uffer sp|ace for |
|000010e0| 61 20 67 69 76 65 6e 20 | 63 6f 6e 6e 65 63 74 69 |a given |connecti|
|000010f0| 6f 6e 0d 20 20 20 73 74 | 72 65 61 6d 2e 20 20 54 |on. st|ream. T|
|00001100| 68 69 73 20 63 61 6c 6c | 20 73 68 6f 75 6c 64 20 |his call| should |
|00001110| 62 65 20 6d 61 64 65 20 | 61 66 74 65 72 20 43 6c |be made |after Cl|
|00001120| 6f 73 65 43 6f 6e 6e 65 | 63 74 69 6f 6e 2e 20 2a |oseConne|ction. *|
|00001130| 2f 0d 20 20 20 0d 4f 53 | 45 72 72 20 52 65 6c 65 |/. .OS|Err Rele|
|00001140| 61 73 65 53 74 72 65 61 | 6d 28 75 6e 73 69 67 6e |aseStrea|m(unsign|
|00001150| 65 64 20 6c 6f 6e 67 20 | 73 74 72 65 61 6d 29 0d |ed long |stream).|
|00001160| 7b 0d 09 4f 53 45 72 72 | 20 65 72 72 3b 0d 09 50 |{..OSErr| err;..P|
|00001170| 74 72 20 72 65 63 76 50 | 74 72 3b 0d 09 75 6e 73 |tr recvP|tr;..uns|
|00001180| 69 67 6e 65 64 20 6c 6f | 6e 67 20 72 65 63 76 4c |igned lo|ng recvL|
|00001190| 65 6e 3b 0d 09 0d 09 69 | 66 20 28 28 65 72 72 20 |en;....i|f ((err |
|000011a0| 3d 20 4c 6f 77 54 43 50 | 52 65 6c 65 61 73 65 28 |= LowTCP|Release(|
|000011b0| 73 74 72 65 61 6d 2c 26 | 72 65 63 76 50 74 72 2c |stream,&|recvPtr,|
|000011c0| 26 72 65 63 76 4c 65 6e | 29 29 20 3d 3d 20 6e 6f |&recvLen|)) == no|
|000011d0| 45 72 72 29 0d 09 09 09 | 4d 79 44 69 73 70 6f 73 |Err)....|MyDispos|
|000011e0| 50 74 72 28 72 65 63 76 | 50 74 72 29 3b 0d 09 0d |Ptr(recv|Ptr);...|
|000011f0| 09 72 65 74 75 72 6e 20 | 65 72 72 3b 0d 7d 0d 0d |.return |err;.}..|
|00001200| 0d 2f 2a 20 53 65 6e 64 | 44 61 74 61 28 29 20 73 |./* Send|Data() s|
|00001210| 65 6e 64 73 20 64 61 74 | 61 20 61 6c 6f 6e 67 20 |ends dat|a along |
|00001220| 61 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 73 74 72 |a connec|tion str|
|00001230| 65 61 6d 20 74 6f 20 61 | 20 72 65 6d 6f 74 65 20 |eam to a| remote |
|00001240| 68 6f 73 74 2e 20 2a 2f | 0d 0d 4f 53 45 72 72 20 |host. */|..OSErr |
|00001250| 53 65 6e 64 44 61 74 61 | 28 75 6e 73 69 67 6e 65 |SendData|(unsigne|
|00001260| 64 20 6c 6f 6e 67 20 73 | 74 72 65 61 6d 2c 50 74 |d long s|tream,Pt|
|00001270| 72 20 64 61 74 61 2c 75 | 6e 73 69 67 6e 65 64 20 |r data,u|nsigned |
|00001280| 73 68 6f 72 74 20 6c 65 | 6e 67 74 68 2c 42 6f 6f |short le|ngth,Boo|
|00001290| 6c 65 61 6e 20 72 65 74 | 72 79 29 0d 7b 09 0d 09 |lean ret|ry).{...|
|000012a0| 4f 53 45 72 72 20 65 72 | 72 3b 0d 09 73 74 72 75 |OSErr er|r;..stru|
|000012b0| 63 74 20 77 64 73 45 6e | 74 72 79 20 6d 79 57 44 |ct wdsEn|try myWD|
|000012c0| 53 5b 32 5d 3b 09 2f 2a | 20 67 6c 6f 62 61 6c 20 |S[2];./*| global |
|000012d0| 77 72 69 74 65 20 64 61 | 74 61 20 73 74 72 75 63 |write da|ta struc|
|000012e0| 74 75 72 65 20 2a 2f 0d | 0d 0d 09 49 6e 69 74 4e |ture */.|...InitN|
|000012f0| 65 74 43 75 72 73 6f 72 | 28 29 3b 0d 09 6d 79 57 |etCursor|();..myW|
|00001300| 44 53 5b 30 5d 2e 6c 65 | 6e 67 74 68 20 3d 20 6c |DS[0].le|ngth = l|
|00001310| 65 6e 67 74 68 3b 0d 09 | 6d 79 57 44 53 5b 30 5d |ength;..|myWDS[0]|
|00001320| 2e 70 74 72 20 3d 20 64 | 61 74 61 3b 0d 09 6d 79 |.ptr = d|ata;..my|
|00001330| 57 44 53 5b 31 5d 2e 6c | 65 6e 67 74 68 20 3d 20 |WDS[1].l|ength = |
|00001340| 30 3b 0d 09 6d 79 57 44 | 53 5b 31 5d 2e 70 74 72 |0;..myWD|S[1].ptr|
|00001350| 20 3d 20 6e 69 6c 3b 0d | 09 64 6f 0d 09 09 65 72 | = nil;.|.do...er|
|00001360| 72 20 3d 20 4c 6f 77 54 | 43 50 53 65 6e 64 44 61 |r = LowT|CPSendDa|
|00001370| 74 61 28 73 74 72 65 61 | 6d 2c 32 30 2c 66 61 6c |ta(strea|m,20,fal|
|00001380| 73 65 2c 66 61 6c 73 65 | 2c 28 50 74 72 29 20 6d |se,false|,(Ptr) m|
|00001390| 79 57 44 53 2c 66 61 6c | 73 65 2c 6e 69 6c 29 3b |yWDS,fal|se,nil);|
|000013a0| 0d 09 77 68 69 6c 65 20 | 28 72 65 74 72 79 20 26 |..while |(retry &|
|000013b0| 26 20 65 72 72 3d 3d 63 | 6f 6d 6d 61 6e 64 54 69 |& err==c|ommandTi|
|000013c0| 6d 65 6f 75 74 29 3b 0d | 09 54 72 61 73 68 4e 65 |meout);.|.TrashNe|
|000013d0| 74 43 75 72 73 6f 72 28 | 29 3b 0d 09 72 65 74 75 |tCursor(|);..retu|
|000013e0| 72 6e 20 65 72 72 3b 0d | 7d 0d 0d 2f 2a 20 53 65 |rn err;.|}../* Se|
|000013f0| 6e 64 4d 75 6c 74 69 44 | 61 74 61 28 29 20 69 73 |ndMultiD|ata() is|
|00001400| 20 73 69 6d 69 6c 61 72 | 20 74 6f 20 53 65 6e 64 | similar| to Send|
|00001410| 44 61 74 61 2c 20 62 75 | 74 20 74 61 6b 65 73 20 |Data, bu|t takes |
|00001420| 61 6e 20 61 72 72 61 79 | 20 6f 66 20 73 74 72 69 |an array| of stri|
|00001430| 6e 67 73 20 74 6f 20 73 | 65 6e 64 0d 20 20 20 74 |ngs to s|end. t|
|00001440| 6f 20 74 68 65 20 72 65 | 6d 6f 74 65 20 68 6f 73 |o the re|mote hos|
|00001450| 74 2e 20 2a 2f 0d 0d 4f | 53 45 72 72 20 53 65 6e |t. */..O|SErr Sen|
|00001460| 64 4d 75 6c 74 69 44 61 | 74 61 28 75 6e 73 69 67 |dMultiDa|ta(unsig|
|00001470| 6e 65 64 20 6c 6f 6e 67 | 20 73 74 72 65 61 6d 2c |ned long| stream,|
|00001480| 53 74 72 32 35 35 20 64 | 61 74 61 5b 5d 2c 73 68 |Str255 d|ata[],sh|
|00001490| 6f 72 74 20 6e 75 6d 44 | 61 74 61 2c 42 6f 6f 6c |ort numD|ata,Bool|
|000014a0| 65 61 6e 20 72 65 74 72 | 79 29 0d 7b 0d 09 73 74 |ean retr|y).{..st|
|000014b0| 72 75 63 74 20 77 64 73 | 45 6e 74 72 79 20 2a 74 |ruct wds|Entry *t|
|000014c0| 68 65 57 44 53 3b 0d 09 | 73 68 6f 72 74 20 69 3b |heWDS;..|short i;|
|000014d0| 0d 09 4f 53 45 72 72 20 | 65 72 72 3b 0d 09 0d 09 |..OSErr |err;....|
|000014e0| 49 6e 69 74 4e 65 74 43 | 75 72 73 6f 72 28 29 3b |InitNetC|ursor();|
|000014f0| 0d 09 74 68 65 57 44 53 | 20 3d 20 28 77 64 73 45 |..theWDS| = (wdsE|
|00001500| 6e 74 72 79 20 2a 29 4e | 65 77 50 74 72 28 28 6e |ntry *)N|ewPtr((n|
|00001510| 75 6d 44 61 74 61 2b 31 | 29 20 2a 20 73 69 7a 65 |umData+1|) * size|
|00001520| 6f 66 28 77 64 73 45 6e | 74 72 79 29 29 3b 0d 09 |of(wdsEn|try));..|
|00001530| 69 66 20 28 4d 65 6d 45 | 72 72 6f 72 28 29 29 0d |if (MemE|rror()).|
|00001540| 09 09 72 65 74 75 72 6e | 20 4d 65 6d 45 72 72 6f |..return| MemErro|
|00001550| 72 28 29 3b 09 0d 09 74 | 68 65 57 44 53 5b 6e 75 |r();...t|heWDS[nu|
|00001560| 6d 44 61 74 61 5d 2e 6c | 65 6e 67 74 68 20 3d 20 |mData].l|ength = |
|00001570| 30 3b 0d 09 74 68 65 57 | 44 53 5b 6e 75 6d 44 61 |0;..theW|DS[numDa|
|00001580| 74 61 5d 2e 70 74 72 20 | 3d 20 6e 69 6c 3b 0d 09 |ta].ptr |= nil;..|
|00001590| 66 6f 72 20 28 69 3d 30 | 3b 20 69 3c 6e 75 6d 44 |for (i=0|; i<numD|
|000015a0| 61 74 61 3b 20 69 2b 2b | 29 20 7b 0d 09 09 74 68 |ata; i++|) {...th|
|000015b0| 65 57 44 53 5b 69 5d 2e | 70 74 72 20 3d 20 64 61 |eWDS[i].|ptr = da|
|000015c0| 74 61 5b 69 5d 3b 0d 09 | 09 74 68 65 57 44 53 5b |ta[i];..|.theWDS[|
|000015d0| 69 5d 2e 6c 65 6e 67 74 | 68 20 3d 20 73 74 72 6c |i].lengt|h = strl|
|000015e0| 65 6e 28 28 63 68 61 72 | 20 2a 29 64 61 74 61 5b |en((char| *)data[|
|000015f0| 69 5d 29 3b 0d 09 7d 0d | 09 64 6f 0d 09 09 65 72 |i]);..}.|.do...er|
|00001600| 72 20 3d 20 4c 6f 77 54 | 43 50 53 65 6e 64 44 61 |r = LowT|CPSendDa|
|00001610| 74 61 28 73 74 72 65 61 | 6d 2c 32 30 2c 66 61 6c |ta(strea|m,20,fal|
|00001620| 73 65 2c 66 61 6c 73 65 | 2c 28 50 74 72 29 20 74 |se,false|,(Ptr) t|
|00001630| 68 65 57 44 53 2c 66 61 | 6c 73 65 2c 6e 69 6c 29 |heWDS,fa|lse,nil)|
|00001640| 3b 0d 09 77 68 69 6c 65 | 20 28 72 65 74 72 79 20 |;..while| (retry |
|00001650| 26 26 20 65 72 72 3d 3d | 63 6f 6d 6d 61 6e 64 54 |&& err==|commandT|
|00001660| 69 6d 65 6f 75 74 29 3b | 0d 09 4d 79 44 69 73 70 |imeout);|..MyDisp|
|00001670| 6f 73 50 74 72 28 28 50 | 74 72 29 74 68 65 57 44 |osPtr((P|tr)theWD|
|00001680| 53 29 3b 0d 09 54 72 61 | 73 68 4e 65 74 43 75 72 |S);..Tra|shNetCur|
|00001690| 73 6f 72 28 29 3b 0d 09 | 72 65 74 75 72 6e 20 65 |sor();..|return e|
|000016a0| 72 72 3b 0d 7d 0d 0d 0d | 2f 2a 20 53 65 6e 64 44 |rr;.}...|/* SendD|
|000016b0| 61 74 61 41 73 79 6e 63 | 28 29 20 73 65 6e 64 73 |ataAsync|() sends|
|000016c0| 20 64 61 74 61 20 74 6f | 20 61 20 72 65 6d 6f 74 | data to| a remot|
|000016d0| 65 20 68 6f 73 74 20 61 | 73 79 6e 63 68 72 6f 6e |e host a|synchron|
|000016e0| 6f 75 73 6c 79 2e 20 20 | 54 68 65 20 69 6f 52 65 |ously. |The ioRe|
|000016f0| 73 75 6c 74 0d 20 20 20 | 70 61 72 61 6d 65 74 65 |sult. |paramete|
|00001700| 72 20 62 6c 6f 63 6b 20 | 76 61 72 69 61 62 6c 65 |r block |variable|
|00001710| 20 73 68 6f 75 6c 64 20 | 62 65 20 63 68 65 63 6b | should |be check|
|00001720| 65 64 2c 20 61 6e 64 20 | 53 65 6e 64 44 61 74 61 |ed, and |SendData|
|00001730| 44 6f 6e 65 28 29 20 63 | 61 6c 6c 65 64 20 77 68 |Done() c|alled wh|
|00001740| 65 6e 0d 20 20 20 74 68 | 69 73 20 66 6c 61 67 20 |en. th|is flag |
|00001750| 69 73 20 7a 65 72 6f 20 | 6f 72 20 6e 65 67 61 74 |is zero |or negat|
|00001760| 69 76 65 20 2a 2f 0d 0d | 76 6f 69 64 20 53 65 6e |ive */..|void Sen|
|00001770| 64 44 61 74 61 41 73 79 | 6e 63 28 75 6e 73 69 67 |dDataAsy|nc(unsig|
|00001780| 6e 65 64 20 6c 6f 6e 67 | 20 73 74 72 65 61 6d 2c |ned long| stream,|
|00001790| 20 50 74 72 20 64 61 74 | 61 2c 75 6e 73 69 67 6e | Ptr dat|a,unsign|
|000017a0| 65 64 20 73 68 6f 72 74 | 20 6c 65 6e 67 74 68 2c |ed short| length,|
|000017b0| 54 43 50 69 6f 70 62 20 | 2a 2a 72 65 74 75 72 6e |TCPiopb |**return|
|000017c0| 42 6c 6f 63 6b 29 0d 7b | 09 0d 09 73 74 72 75 63 |Block).{|...struc|
|000017d0| 74 20 77 64 73 45 6e 74 | 72 79 20 2a 74 68 65 57 |t wdsEnt|ry *theW|
|000017e0| 44 53 3b 0d 0d 09 49 6e | 69 74 4e 65 74 43 75 72 |DS;...In|itNetCur|
|000017f0| 73 6f 72 28 29 3b 0d 09 | 74 68 65 57 44 53 20 3d |sor();..|theWDS =|
|00001800| 20 28 77 64 73 45 6e 74 | 72 79 20 2a 29 4e 65 77 | (wdsEnt|ry *)New|
|00001810| 50 74 72 28 20 28 32 2a | 73 69 7a 65 6f 66 28 77 |Ptr( (2*|sizeof(w|
|00001820| 64 73 45 6e 74 72 79 29 | 29 20 29 3b 0d 09 74 68 |dsEntry)|) );..th|
|00001830| 65 57 44 53 5b 30 5d 2e | 6c 65 6e 67 74 68 20 3d |eWDS[0].|length =|
|00001840| 20 6c 65 6e 67 74 68 3b | 0d 09 74 68 65 57 44 53 | length;|..theWDS|
|00001850| 5b 30 5d 2e 70 74 72 20 | 3d 20 64 61 74 61 3b 0d |[0].ptr |= data;.|
|00001860| 09 74 68 65 57 44 53 5b | 31 5d 2e 6c 65 6e 67 74 |.theWDS[|1].lengt|
|00001870| 68 20 3d 20 30 3b 0d 09 | 74 68 65 57 44 53 5b 31 |h = 0;..|theWDS[1|
|00001880| 5d 2e 70 74 72 20 3d 20 | 30 3b 0d 09 4c 6f 77 54 |].ptr = |0;..LowT|
|00001890| 43 50 53 65 6e 64 44 61 | 74 61 28 73 74 72 65 61 |CPSendDa|ta(strea|
|000018a0| 6d 2c 32 30 2c 66 61 6c | 73 65 2c 66 61 6c 73 65 |m,20,fal|se,false|
|000018b0| 2c 28 50 74 72 29 20 74 | 68 65 57 44 53 2c 74 72 |,(Ptr) t|heWDS,tr|
|000018c0| 75 65 2c 72 65 74 75 72 | 6e 42 6c 6f 63 6b 29 3b |ue,retur|nBlock);|
|000018d0| 0d 09 54 72 61 73 68 4e | 65 74 43 75 72 73 6f 72 |..TrashN|etCursor|
|000018e0| 28 29 3b 0d 7d 0d 0d 0d | 2f 2a 20 53 65 6e 64 44 |();.}...|/* SendD|
|000018f0| 61 74 61 44 6f 6e 65 28 | 29 20 73 68 6f 75 6c 64 |ataDone(|) should|
|00001900| 20 62 65 20 63 61 6c 6c | 65 64 20 69 6e 20 72 65 | be call|ed in re|
|00001910| 73 70 6f 6e 73 65 20 74 | 6f 20 74 68 65 20 63 6f |sponse t|o the co|
|00001920| 6d 70 6c 65 74 69 6f 6e | 20 6f 66 20 61 20 53 65 |mpletion| of a Se|
|00001930| 6e 64 44 61 74 61 41 73 | 79 6e 63 0d 20 20 20 63 |ndDataAs|ync. c|
|00001940| 61 6c 6c 2e 20 20 49 74 | 20 72 65 74 75 72 6e 73 |all. It| returns|
|00001950| 20 61 6e 79 20 65 72 72 | 6f 72 20 77 68 69 63 68 | any err|or which|
|00001960| 20 6f 63 63 75 72 72 65 | 64 20 69 6e 20 74 68 65 | occurre|d in the|
|00001970| 20 73 65 6e 64 2e 20 2a | 2f 0d 0d 4f 53 45 72 72 | send. *|/..OSErr|
|00001980| 20 53 65 6e 64 41 73 79 | 6e 63 44 6f 6e 65 28 54 | SendAsy|ncDone(T|
|00001990| 43 50 69 6f 70 62 20 2a | 72 65 74 75 72 6e 42 6c |CPiopb *|returnBl|
|000019a0| 6f 63 6b 29 0d 7b 0d 09 | 4d 79 44 69 73 70 6f 73 |ock).{..|MyDispos|
|000019b0| 50 74 72 28 28 50 74 72 | 29 72 65 74 75 72 6e 42 |Ptr((Ptr|)returnB|
|000019c0| 6c 6f 63 6b 2d 3e 63 73 | 50 61 72 61 6d 2e 73 65 |lock->cs|Param.se|
|000019d0| 6e 64 2e 77 64 73 50 74 | 72 29 3b 0d 09 72 65 74 |nd.wdsPt|r);..ret|
|000019e0| 75 72 6e 20 4c 6f 77 46 | 69 6e 69 73 68 54 43 50 |urn LowF|inishTCP|
|000019f0| 53 65 6e 64 28 72 65 74 | 75 72 6e 42 6c 6f 63 6b |Send(ret|urnBlock|
|00001a00| 29 3b 0d 7d 0d 0d 0d 2f | 2a 20 52 65 63 76 44 61 |);.}.../|* RecvDa|
|00001a10| 74 61 28 29 20 77 61 69 | 74 73 20 66 6f 72 20 64 |ta() wai|ts for d|
|00001a20| 61 74 61 20 74 6f 20 62 | 65 20 72 65 63 65 69 76 |ata to b|e receiv|
|00001a30| 65 64 20 6f 6e 20 61 20 | 63 6f 6e 6e 65 63 74 69 |ed on a |connecti|
|00001a40| 6f 6e 20 73 74 72 65 61 | 6d 2e 20 20 57 68 65 6e |on strea|m. When|
|00001a50| 20 64 61 74 61 0d 20 20 | 20 61 72 72 69 76 65 73 | data. | arrives|
|00001a60| 2c 20 69 74 20 69 73 20 | 63 6f 70 69 65 64 20 69 |, it is |copied i|
|00001a70| 6e 74 6f 20 74 68 65 20 | 64 61 74 61 20 62 75 66 |nto the |data buf|
|00001a80| 66 65 72 20 61 6e 64 20 | 74 68 65 20 63 61 6c 6c |fer and |the call|
|00001a90| 20 74 65 72 6d 69 6e 61 | 74 65 73 2e 20 2a 2f 0d | termina|tes. */.|
|00001aa0| 0d 4f 53 45 72 72 20 52 | 65 63 76 44 61 74 61 28 |.OSErr R|ecvData(|
|00001ab0| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 73 74 |unsigned| long st|
|00001ac0| 72 65 61 6d 2c 50 74 72 | 20 64 61 74 61 2c 75 6e |ream,Ptr| data,un|
|00001ad0| 73 69 67 6e 65 64 20 73 | 68 6f 72 74 20 2a 6c 65 |signed s|hort *le|
|00001ae0| 6e 67 74 68 2c 42 6f 6f | 6c 65 61 6e 20 72 65 74 |ngth,Boo|lean ret|
|00001af0| 72 79 29 0d 7b 0d 09 42 | 6f 6f 6c 65 61 6e 09 75 |ry).{..B|oolean.u|
|00001b00| 72 67 65 6e 74 2c 6d 61 | 72 6b 3b 0d 09 4f 53 45 |rgent,ma|rk;..OSE|
|00001b10| 72 72 09 65 72 72 3b 0d | 09 75 6e 73 69 67 6e 65 |rr.err;.|.unsigne|
|00001b20| 64 20 73 68 6f 72 74 20 | 72 65 63 76 4c 65 6e 67 |d short |recvLeng|
|00001b30| 74 68 3b 0d 0d 09 49 6e | 69 74 4e 65 74 43 75 72 |th;...In|itNetCur|
|00001b40| 73 6f 72 28 29 3b 0d 09 | 64 6f 20 7b 0d 09 09 72 |sor();..|do {...r|
|00001b50| 65 63 76 4c 65 6e 67 74 | 68 20 3d 20 2a 6c 65 6e |ecvLengt|h = *len|
|00001b60| 67 74 68 3b 0d 09 09 65 | 72 72 20 3d 20 4c 6f 77 |gth;...e|rr = Low|
|00001b70| 54 43 50 52 65 63 76 44 | 61 74 61 28 73 74 72 65 |TCPRecvD|ata(stre|
|00001b80| 61 6d 2c 32 30 2c 26 75 | 72 67 65 6e 74 2c 26 6d |am,20,&u|rgent,&m|
|00001b90| 61 72 6b 2c 64 61 74 61 | 2c 26 72 65 63 76 4c 65 |ark,data|,&recvLe|
|00001ba0| 6e 67 74 68 2c 66 61 6c | 73 65 2c 6e 69 6c 29 3b |ngth,fal|se,nil);|
|00001bb0| 0d 09 7d 0d 09 77 68 69 | 6c 65 20 28 72 65 74 72 |..}..whi|le (retr|
|00001bc0| 79 20 26 26 20 65 72 72 | 3d 3d 63 6f 6d 6d 61 6e |y && err|==comman|
|00001bd0| 64 54 69 6d 65 6f 75 74 | 29 3b 0d 09 2a 6c 65 6e |dTimeout|);..*len|
|00001be0| 67 74 68 20 3d 20 72 65 | 63 76 4c 65 6e 67 74 68 |gth = re|cvLength|
|00001bf0| 3b 0d 09 69 66 20 28 65 | 72 72 20 3d 3d 20 6e 6f |;..if (e|rr == no|
|00001c00| 45 72 72 29 20 7b 0d 09 | 09 2a 28 64 61 74 61 2b |Err) {..|.*(data+|
|00001c10| 2a 6c 65 6e 67 74 68 29 | 20 3d 20 27 5c 30 27 3b |*length)| = '\0';|
|00001c20| 0d 09 7d 0d 09 54 72 61 | 73 68 4e 65 74 43 75 72 |..}..Tra|shNetCur|
|00001c30| 73 6f 72 28 29 3b 0d 09 | 72 65 74 75 72 6e 20 65 |sor();..|return e|
|00001c40| 72 72 3b 0d 7d 0d 0d 0d | 2f 2a 20 52 65 63 76 44 |rr;.}...|/* RecvD|
|00001c50| 61 74 61 41 73 79 6e 63 | 28 29 20 69 73 20 69 64 |ataAsync|() is id|
|00001c60| 65 6e 74 69 63 61 6c 20 | 74 6f 20 52 65 63 76 44 |entical |to RecvD|
|00001c70| 61 74 61 20 61 62 6f 76 | 65 2c 20 62 75 74 20 69 |ata abov|e, but i|
|00001c80| 6e 20 74 68 69 73 20 63 | 61 73 65 2c 20 74 68 65 |n this c|ase, the|
|00001c90| 20 63 61 6c 6c 20 69 73 | 0d 20 20 20 6d 61 64 65 | call is|. made|
|00001ca0| 20 61 73 79 6e 63 68 72 | 6f 6e 6f 75 73 6c 79 2e | asynchr|onously.|
|00001cb0| 20 2a 2f 0d 0d 76 6f 69 | 64 20 52 65 63 76 44 61 | */..voi|d RecvDa|
|00001cc0| 74 61 41 73 79 6e 63 28 | 75 6e 73 69 67 6e 65 64 |taAsync(|unsigned|
|00001cd0| 20 6c 6f 6e 67 20 73 74 | 72 65 61 6d 2c 50 74 72 | long st|ream,Ptr|
|00001ce0| 20 64 61 74 61 2c 75 6e | 73 69 67 6e 65 64 20 73 | data,un|signed s|
|00001cf0| 68 6f 72 74 20 6c 65 6e | 67 74 68 2c 54 43 50 69 |hort len|gth,TCPi|
|00001d00| 6f 70 62 20 2a 2a 72 65 | 74 75 72 6e 42 6c 6f 63 |opb **re|turnBloc|
|00001d10| 6b 29 0d 7b 0d 09 42 6f | 6f 6c 65 61 6e 20 75 72 |k).{..Bo|olean ur|
|00001d20| 67 65 6e 74 2c 6d 61 72 | 6b 3b 0d 09 0d 09 4c 6f |gent,mar|k;....Lo|
|00001d30| 77 54 43 50 52 65 63 76 | 44 61 74 61 28 73 74 72 |wTCPRecv|Data(str|
|00001d40| 65 61 6d 2c 32 30 2c 26 | 75 72 67 65 6e 74 2c 26 |eam,20,&|urgent,&|
|00001d50| 6d 61 72 6b 2c 64 61 74 | 61 2c 26 6c 65 6e 67 74 |mark,dat|a,&lengt|
|00001d60| 68 2c 74 72 75 65 2c 72 | 65 74 75 72 6e 42 6c 6f |h,true,r|eturnBlo|
|00001d70| 63 6b 29 3b 0d 7d 0d 0d | 0d 2f 2a 20 47 65 74 44 |ck);.}..|./* GetD|
|00001d80| 61 74 61 4c 65 6e 67 74 | 68 28 29 20 73 68 6f 75 |ataLengt|h() shou|
|00001d90| 6c 64 20 62 65 20 63 61 | 6c 6c 65 64 20 69 6e 20 |ld be ca|lled in |
|00001da0| 72 65 73 70 6f 6e 73 65 | 20 74 6f 20 74 68 65 20 |response| to the |
|00001db0| 63 6f 6d 70 6c 65 74 69 | 6f 6e 20 6f 66 20 74 68 |completi|on of th|
|00001dc0| 65 0d 20 20 20 52 65 63 | 76 44 61 74 61 41 73 79 |e. Rec|vDataAsy|
|00001dd0| 6e 63 20 63 61 6c 6c 2e | 20 2a 2f 0d 0d 4f 53 45 |nc call.| */..OSE|
|00001de0| 72 72 20 47 65 74 44 61 | 74 61 4c 65 6e 67 74 68 |rr GetDa|taLength|
|00001df0| 28 54 43 50 69 6f 70 62 | 20 2a 72 65 74 75 72 6e |(TCPiopb| *return|
|00001e00| 42 6c 6f 63 6b 2c 75 6e | 73 69 67 6e 65 64 20 73 |Block,un|signed s|
|00001e10| 68 6f 72 74 20 2a 6c 65 | 6e 67 74 68 29 0d 7b 0d |hort *le|ngth).{.|
|00001e20| 09 42 6f 6f 6c 65 61 6e | 20 75 72 67 65 6e 74 2c |.Boolean| urgent,|
|00001e30| 6d 61 72 6b 3b 0d 09 0d | 09 72 65 74 75 72 6e 20 |mark;...|.return |
|00001e40| 4c 6f 77 46 69 6e 69 73 | 68 54 43 50 52 65 63 76 |LowFinis|hTCPRecv|
|00001e50| 28 72 65 74 75 72 6e 42 | 6c 6f 63 6b 2c 26 75 72 |(returnB|lock,&ur|
|00001e60| 67 65 6e 74 2c 26 6d 61 | 72 6b 2c 6c 65 6e 67 74 |gent,&ma|rk,lengt|
|00001e70| 68 29 3b 0d 7d 0d 0d 0d | 76 6f 69 64 20 53 74 61 |h);.}...|void Sta|
|00001e80| 74 75 73 50 72 6f 63 28 | 63 68 61 72 20 2a 73 74 |tusProc(|char *st|
|00001e90| 61 74 75 73 29 0d 7b 0d | 09 53 74 72 32 35 35 20 |atus).{.|.Str255 |
|00001ea0| 50 73 74 61 74 75 73 3b | 0d 09 73 74 72 63 70 79 |Pstatus;|..strcpy|
|00001eb0| 28 50 73 74 61 74 75 73 | 2c 73 74 61 74 75 73 29 |(Pstatus|,status)|
|00001ec0| 3b 0d 09 63 32 70 73 74 | 72 28 50 73 74 61 74 75 |;..c2pst|r(Pstatu|
|00001ed0| 73 29 3b 0d 2f 2a 09 44 | 65 62 75 67 53 74 72 28 |s);./*.D|ebugStr(|
|00001ee0| 50 73 74 61 74 75 73 29 | 3b 20 2a 2f 0d 7d 00 00 |Pstatus)|; */.}..|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f00| 00 00 01 00 00 00 02 f4 | 00 00 01 f4 00 00 00 4a |........|.......J|
|00001f10| 3b 0d 7d 73 73 00 00 00 | 4e 56 ff fc 48 e7 07 18 |;.}ss...|NV..H...|
|00001f20| 28 6e 00 0c 2a 2e 00 08 | 4a ad fa a4 66 08 41 ed |(n..*...|J...f.A.|
|00001f30| 07 74 63 70 68 69 2e 63 | 02 00 00 00 50 61 72 74 |.tcphi.c|....Part|
|00001f40| 53 49 54 78 00 00 00 00 | 00 00 00 00 00 01 90 dd |SITx....|........|
|00001f50| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00001f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f70| 00 00 a9 8d 49 7a 00 00 | 00 00 00 00 03 3e ff fc |....Iz..|.....>..|
|00001f80| b9 fc 00 00 00 01 66 08 | 41 ed 00 62 26 88 60 48 |......f.|A..b&.`H|
|00001f90| b9 fc 00 00 00 03 66 0e | 20 6d fa a4 20 05 46 80 |......f.| m.. .F.|
|00001fa0| c1 68 00 02 60 32 b9 fc | 00 00 00 05 66 28 20 6d |.h..`2..|....f( m|
|00001fb0| fa a4 8b 68 00 02 70 02 | b0 85 66 10 20 6d fa a4 |...h..p.|..f. m..|
|00001fc0| 70 00 30 10 22 05 c2 80 | 66 f2 60 0c 2f 05 4e ba |p.0."...|f.`./.N.|
|00001fd0| 00 20 58 8f 60 02 26 8c | 20 2e ff fc 4c ee 18 e0 |. X.`.&.| ...L...|
|00001fe0| ff e8 4e 5e 4e 75 86 73 | 69 67 6e 61 6c 00 00 00 |..N^Nu.s|ignal...|
|00001ff0| 4e 56 00 00 48 e7 07 18 | 2a 2e 00 08 4a ad fa a4 |NV..H...|*...J...|
|00002000| 00 00 00 1e 00 50 00 20 | 03 63 02 3d 00 50 00 20 |.....P. |.c.=.P. |
|00002010| 03 63 02 3d 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c.=....|........|
|00002020| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|00002030| 00 00 ff ff ff ff 00 00 | 00 00 ff ff ff ff 00 00 |........|........|
|00002040| 00 00 ff ff ff ff 00 00 | 00 06 00 04 00 2d 00 2a |........|.....-.*|
|00002050| 01 ce 02 43 00 2d 00 2a | 01 ce 02 43 a3 ef a7 cd |...C.-.*|...C....|
|00002060| 00 00 11 7c 00 00 11 7c | 00 00 00 00 01 00 00 00 |...|...||........|
|00002070| 01 82 00 11 00 00 04 28 | 00 00 04 35 0d 49 6e 69 |.......(|...5.Ini|
|00002080| 74 4e 65 74 43 75 72 73 | 6f 72 00 00 04 f3 00 00 |tNetCurs|or......|
|00002090| 05 01 0f 54 72 61 73 68 | 4e 65 74 43 75 72 73 6f |...Trash|NetCurso|
|000020a0| 72 00 00 00 05 79 00 00 | 05 84 0b 49 6e 69 74 4e |r....y..|...InitN|
|000020b0| 65 74 77 6f 72 6b 00 00 | 06 59 00 00 06 65 0d 43 |etwork..|.Y...e.C|
|000020c0| 72 65 61 74 65 53 74 72 | 65 61 6d 00 00 00 07 ea |reateStr|eam.....|
|000020d0| 00 00 07 f8 0f 4f 70 65 | 6e 43 6f 6e 6e 65 63 74 |.....Ope|nConnect|
|000020e0| 69 6f 6e 00 00 00 0c 5c | 00 00 0c 72 17 41 73 79 |ion....\|...r.Asy|
|000020f0| 6e 63 47 65 74 43 6f 6e | 6e 65 63 74 69 6f 6e 44 |ncGetCon|nectionD|
|00002100| 61 74 61 00 00 00 0e ab | 00 00 0e ba 0f 43 6c 6f |ata.....|.....Clo|
|00002110| 73 65 43 6f 6e 6e 65 63 | 74 69 6f 6e 00 00 0f 70 |seConnec|tion...p|
|00002120| 00 00 0f 7f 0f 41 62 6f | 72 74 43 6f 6e 6e 65 63 |.....Abo|rtConnec|
|00002130| 74 69 6f 6e 00 00 10 4e | 00 00 10 5f 11 52 65 6c |tion...N|..._.Rel|
|00002140| 65 61 73 65 43 6f 6e 6e | 65 63 74 69 6f 6e 00 00 |easeConn|ection..|
|00002150| 11 62 00 00 11 6a 09 53 | 65 6e 64 44 61 74 61 00 |.b...j.S|endData.|
|00002160| 00 00 13 3a 00 00 13 47 | 0d 53 65 6e 64 4d 75 6c |...:...G|.SendMul|
|00002170| 74 69 44 61 74 61 00 00 | 16 4a 00 00 16 57 0d 53 |tiData..|.J...W.S|
|00002180| 65 6e 64 44 61 74 61 41 | 73 79 6e 63 00 00 18 05 |endDataA|sync....|
|00002190| 00 00 18 11 0d 53 65 6e | 64 44 61 74 61 44 6f 6e |.....Sen|dDataDon|
|000021a0| 65 00 00 00 18 eb 00 00 | 18 f3 09 52 65 63 76 44 |e.......|...RecvD|
|000021b0| 61 74 61 00 00 00 1a fe | 00 00 1b 0b 0d 52 65 63 |ata.....|.....Rec|
|000021c0| 76 44 61 74 61 41 73 79 | 6e 63 00 00 1c 1d 00 00 |vDataAsy|nc......|
|000021d0| 1c 2a 0d 47 65 74 44 61 | 74 61 4c 65 6e 67 74 68 |.*.GetDa|taLength|
|000021e0| 00 00 1c 98 00 00 1c 9d | 0b 53 74 61 74 75 73 50 |........|.StatusP|
|000021f0| 72 6f 63 00 00 00 01 00 | 00 00 02 f4 00 00 01 f4 |roc.....|........|
|00002200| 00 00 00 4a 00 2d b4 90 | 05 84 00 00 00 1c 00 4a |...J.-..|.......J|
|00002210| 00 00 4d 50 53 52 00 02 | 00 0a 03 f0 ff ff 00 00 |..MPSR..|........|
|00002220| 00 00 00 00 00 00 03 ed | ff ff 00 00 00 22 00 00 |........|....."..|
|00002230| 00 00 03 ef ff ff 00 00 | 00 6e 00 2f 58 30 00 00 |........|.n./X0..|
|00002240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+